Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Python development compatibility flag for tests #2560

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

hoodmane
Copy link
Contributor

This also moves toward deriving the bundle name from the compat date.

@@ -506,7 +506,7 @@ kj::Maybe<jsg::Bundle::Reader> fetchPyodideBundle(const api::pyodide::PythonConf

kj::HttpHeaders headers(table);

kj::String url = kj::str("https://pyodide.runtime-playground.workers.dev/pyodide-capnp-bin/pyodide-", version, ".capnp.bin");
kj::String url = kj::str("https://pyodide.runtime-playground.workers.dev/pyodide-capnp-bin/pyodide_", version, ".capnp.bin");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went ahead and reuploaded pyodide-0.26.0a2_2024-03-01_0.capnp.bin with the underscore, but we should add testing for loading pyodide through the URL since ideally we'd like CI to tell us that the file was missing.

@@ -424,12 +424,20 @@ struct CompatibilityFlags @0x8f8c1b68151b6cef {
pythonWorkers @43 :Bool
$compatEnableFlag("python_workers")
$pythonSnapshotRelease(pyodide = "0.26.0a2", pyodideRevision = "2024-03-01",
packages = "2024-03-01", backport = 0);
packages = "2024-03-01", backport = 0)
$impliedByAfterDate(name = "pythonWorkersDevPyodide", date = "2000-01-01");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if I'm understanding this bit. If I set my compatibility date to 2024-02-29, does this mean the python_workers_development flag will be set automatically?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that it says if pythonWorkersDevPyodide is on and the compat date is after 2000-01-01 (aka always) then pythonWorkers should be on too.

@@ -23,7 +23,7 @@ const unitTests :Workerd.Config = (
(name = "{}", pythonRequirement = ""),
],
compatibilityDate = "2024-05-02",
compatibilityFlags = ["python_workers"],
compatibilityFlags = ["python_workers_development"],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we can do a find-and-replace on this string to generate the two variants of tests we talked about. I'll fiddle around with the bazel and make a PR.

Copy link
Collaborator

@garrettgu10 garrettgu10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀🚀🚀🚀🚀

@hoodmane hoodmane force-pushed the hoodmane/python-dev-compat-flag branch from 1664ace to 5b2ebce Compare August 21, 2024 07:36
@hoodmane hoodmane requested a review from a team as a code owner August 21, 2024 07:36
@hoodmane hoodmane force-pushed the hoodmane/python-dev-compat-flag branch 2 times, most recently from 905cc6f to f55c29a Compare August 21, 2024 09:04
@hoodmane hoodmane force-pushed the hoodmane/python-dev-compat-flag branch from f55c29a to c2daf51 Compare August 21, 2024 09:08
@hoodmane hoodmane force-pushed the hoodmane/python-dev-compat-flag branch from c2daf51 to 791f222 Compare August 21, 2024 09:28
@hoodmane hoodmane merged commit 0ef4968 into main Aug 21, 2024
9 of 10 checks passed
@hoodmane hoodmane deleted the hoodmane/python-dev-compat-flag branch August 21, 2024 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants